package jnpf.controller;

import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.base.util.DynDicUtil;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.config.PermissionsConfig;
import jnpf.entity.ZXGL_RenWuZhuanBanEntity;
import jnpf.entity.ZXGL_XiangMuFenJie_mingxibiaoEntity;
import jnpf.entity.ZXGL_XiangMuLiXiang_MingXiEntity;
import jnpf.exception.DataException;
import jnpf.generater.util.GeneraterSwapUtil;
import jnpf.model.zxgl_xiangmufenjie_mingxibiao.*;
import jnpf.permission.OrganizeApi;
import jnpf.permission.UsersApi;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.model.user.UserInfoVO;
import jnpf.service.ZXGL_XiangMuFenJie_mingxibiaoService;
import jnpf.service.ZXGL_XiangMuLiXiang_MingXiService;
import jnpf.util.JsonUtil;
import jnpf.util.RandomUtil;
import jnpf.util.StringUtil;
import jnpf.util.UserProvider;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * ZXGL_XiangMuFenJie_mingxibiao
 *
 * @版本： V2.0
 * @版权： 河北交投智能交通技术有限责任公司
 * @作者： 数字交投项目组
 * @日期： 2025-03-20
 */
@Slf4j
@RestController
@Api(tags = "ZXGL_XiangMuFenJie_mingxibiao", value = "zxgl")
@RequestMapping("/ZXGL_XiangMuFenJie_mingxibiao")
public class ZXGL_XiangMuFenJie_mingxibiaoController {


    @Autowired
    private DynDicUtil dynDicUtil;

    @Autowired
    private GeneraterSwapUtil generaterSwapUtil;

    @Autowired
    private UserProvider userProvider;

    @Autowired
    private ZXGL_XiangMuFenJie_mingxibiaoService zXGL_XiangMuFenJie_mingxibiaoService;

    @Autowired
    private ZXGL_XiangMuLiXiang_MingXiService zxgl_xiangMuLiXiang_mingXiService;

    @Autowired
    private OrganizeApi organizeApi;

    @Autowired
    private UsersApi usersApi;
    @Resource
    PermissionsConfig permissionsConfig;


    /**
     * 列表
     *
     * @param zXGL_XiangMuFenJie_mingxibiaoPagination
     * @return
     */
    @PostMapping("/getList")
    public ActionResult list(@RequestBody ZXGL_XiangMuFenJie_mingxibiaoPagination zXGL_XiangMuFenJie_mingxibiaoPagination) throws IOException {
        List<ZXGL_XiangMuFenJie_mingxibiaoEntity> list = zXGL_XiangMuFenJie_mingxibiaoService.getList(zXGL_XiangMuFenJie_mingxibiaoPagination);
        //处理id字段转名称，若无需转或者为空可删除
//        for (ZXGL_XiangMuFenJie_mingxibiaoEntity entity : list) {
//            entity.setRwly(dynDicUtil.getDicName(entity.getRwly(), "669875872030815877"));
//            entity.setRwlx(dynDicUtil.getDicName(entity.getRwlx(), "670160918163781253"));
//            entity.setZrr(generaterSwapUtil.userSelectValues(entity.getZrr()));
//            entity.setZrbm(generaterSwapUtil.comSelectValues(entity.getZrbm()));
//            entity.setXzr(generaterSwapUtil.userSelectValues(entity.getXzr()));
//            entity.setXzbm(generaterSwapUtil.comSelectValues(entity.getXzbm()));
//            entity.setRwqxkz(generaterSwapUtil.userSelectValues(entity.getRwqxkz()));
//            entity.setZqrw(dynDicUtil.getDicName(entity.getZqrw(), "669876395320571525"));
//            entity.setFkzq(dynDicUtil.getDicName(entity.getFkzq(), "667375897669539141"));
//            entity.setGxckry(generaterSwapUtil.userSelectValues(entity.getGxckry()));
//            entity.setZt(dynDicUtil.getDicName(entity.getZt(), "667276146122954053"));
//            entity.setYjbj(dynDicUtil.getDicName(entity.getYjbj(), "667375644950140229"));
//            entity.setWcjfw(generaterSwapUtil.getFileNameInJson(entity.getWcjfw()));
//            entity.setSjlx(dynDicUtil.getDicName(entity.getSjlx(), "667277254828496197"));
//            entity.setSjdw(dynDicUtil.getDicName(entity.getSjdw(), "671337925434177157"));
//        }
        boolean isAllDataRole = false;
        UserInfo userInfo = userProvider.get();
        if (userInfo.getIsAdministrator()) {
            isAllDataRole = true;
        } else {
            //全部数据权限的角色id
            String alldataRoleId = permissionsConfig.getAlldataRoleid();
            List<String> roleIds = userInfo.getRoleIds();
            if (roleIds != null && StringUtils.isNotBlank(alldataRoleId) && roleIds.contains(alldataRoleId)) {
                isAllDataRole = true;
            }
        }
        List<ZXGL_XiangMuFenJie_mingxibiaoListVO> listVO = JsonUtil.getJsonToList(list, ZXGL_XiangMuFenJie_mingxibiaoListVO.class);
        for (ZXGL_XiangMuFenJie_mingxibiaoListVO zXGL_XiangMuFenJie_mingxibiaoVO : listVO) {
            zXGL_XiangMuFenJie_mingxibiaoVO.setRwly(dynDicUtil.getDicName(zXGL_XiangMuFenJie_mingxibiaoVO.getRwly(), "669875872030815877"));
            zXGL_XiangMuFenJie_mingxibiaoVO.setRwlx(dynDicUtil.getDicName(zXGL_XiangMuFenJie_mingxibiaoVO.getRwlx(), "670160918163781253"));
            zXGL_XiangMuFenJie_mingxibiaoVO.setZrrid(zXGL_XiangMuFenJie_mingxibiaoVO.getZrr());
            zXGL_XiangMuFenJie_mingxibiaoVO.setZrr(generaterSwapUtil.userSelectValues(zXGL_XiangMuFenJie_mingxibiaoVO.getZrr()));
            zXGL_XiangMuFenJie_mingxibiaoVO.setZrbm(generaterSwapUtil.comSelectValues(zXGL_XiangMuFenJie_mingxibiaoVO.getZrbm()));
            zXGL_XiangMuFenJie_mingxibiaoVO.setXzrid(zXGL_XiangMuFenJie_mingxibiaoVO.getXzr());
            zXGL_XiangMuFenJie_mingxibiaoVO.setXzr(generaterSwapUtil.userSelectValues(zXGL_XiangMuFenJie_mingxibiaoVO.getXzr()));
            zXGL_XiangMuFenJie_mingxibiaoVO.setXzbm(generaterSwapUtil.comSelectValues(zXGL_XiangMuFenJie_mingxibiaoVO.getXzbm()));
            zXGL_XiangMuFenJie_mingxibiaoVO.setRwqxkz(generaterSwapUtil.userSelectValues(zXGL_XiangMuFenJie_mingxibiaoVO.getRwqxkz()));
            zXGL_XiangMuFenJie_mingxibiaoVO.setZqrw(dynDicUtil.getDicName(zXGL_XiangMuFenJie_mingxibiaoVO.getZqrw(), "669876395320571525"));
            zXGL_XiangMuFenJie_mingxibiaoVO.setFkzq(dynDicUtil.getDicName(zXGL_XiangMuFenJie_mingxibiaoVO.getFkzq(), "667375897669539141"));
            zXGL_XiangMuFenJie_mingxibiaoVO.setGxckry(generaterSwapUtil.userSelectValues(zXGL_XiangMuFenJie_mingxibiaoVO.getGxckry()));
            zXGL_XiangMuFenJie_mingxibiaoVO.setZtmc(dynDicUtil.getDicName(zXGL_XiangMuFenJie_mingxibiaoVO.getZt(), "667276146122954053"));
            zXGL_XiangMuFenJie_mingxibiaoVO.setYjbj(dynDicUtil.getDicName(zXGL_XiangMuFenJie_mingxibiaoVO.getYjbj(), "667375644950140229"));
            zXGL_XiangMuFenJie_mingxibiaoVO.setWcjfw(generaterSwapUtil.getFileNameInJson(zXGL_XiangMuFenJie_mingxibiaoVO.getWcjfw()));
            zXGL_XiangMuFenJie_mingxibiaoVO.setSjlx(dynDicUtil.getDicName(zXGL_XiangMuFenJie_mingxibiaoVO.getSjlx(), "667277254828496197"));
            zXGL_XiangMuFenJie_mingxibiaoVO.setSjdw(dynDicUtil.getDicName(zXGL_XiangMuFenJie_mingxibiaoVO.getSjdw(), "671337925434177157"));
            zXGL_XiangMuFenJie_mingxibiaoVO.setDepartmentManagerZzbm(zXGL_XiangMuFenJie_mingxibiaoVO.getDepartmentManagerZzbm());
            zXGL_XiangMuFenJie_mingxibiaoVO.setDepartmentHeadleaderZzbm(zXGL_XiangMuFenJie_mingxibiaoVO.getDepartmentHeadleaderZzbm());
            zXGL_XiangMuFenJie_mingxibiaoVO.setIsalldatarole(isAllDataRole);
        }


        PageListVO vo = new PageListVO();
        vo.setList(listVO);
        PaginationVO page = JsonUtil.getJsonToBean(zXGL_XiangMuFenJie_mingxibiaoPagination, PaginationVO.class);
        vo.setPagination(page);
        return ActionResult.success(vo);
    }


    /**
     * 创建
     *
     * @param zXGL_XiangMuFenJie_mingxibiaoCrForm
     * @return
     */
    @PostMapping
    @Transactional
    public ActionResult create(@RequestBody @Valid ZXGL_XiangMuFenJie_mingxibiaoCrForm zXGL_XiangMuFenJie_mingxibiaoCrForm) throws DataException {
        String mainId = RandomUtil.uuId();
        UserInfo userInfo = userProvider.get();
        ZXGL_XiangMuFenJie_mingxibiaoEntity entity = JsonUtil.getJsonToBean(zXGL_XiangMuFenJie_mingxibiaoCrForm, ZXGL_XiangMuFenJie_mingxibiaoEntity.class);
        entity.setId(mainId);
        entity.setCreatorTime(new Date());
        zXGL_XiangMuFenJie_mingxibiaoService.save(entity);
        return ActionResult.success("创建成功");
    }


    /**
     * 信息
     *
     * @param id
     * @return
     */
    @GetMapping("/{id}")
    public ActionResult<ZXGL_XiangMuFenJie_mingxibiaoInfoVO> info(@PathVariable("id") String id) {
        ZXGL_XiangMuFenJie_mingxibiaoEntity entity = zXGL_XiangMuFenJie_mingxibiaoService.getInfo(id);
        ZXGL_XiangMuFenJie_mingxibiaoInfoVO vo = JsonUtil.getJsonToBean(entity, ZXGL_XiangMuFenJie_mingxibiaoInfoVO.class);
        /**
         * 增加主责人部门负责人
         */
        if (StringUtil.isNotEmpty(vo.getZrbm())) {
            OrganizeEntity zbfzr = organizeApi.getById(vo.getZrbm());
            vo.setZzrbmfzr(zbfzr.getDirector());
        }
        //子表
        //副表
        return ActionResult.success(vo);
    }

    /**
     * 表单信息(详情页)
     *
     * @param id
     * @return
     */
    @GetMapping("/detail/{id}")
    public ActionResult<ZXGL_XiangMuFenJie_mingxibiaoInfoVO> detailInfo(@PathVariable("id") String id) {
        ZXGL_XiangMuFenJie_mingxibiaoEntity entity = zXGL_XiangMuFenJie_mingxibiaoService.getInfo(id);
        ZXGL_XiangMuFenJie_mingxibiaoInfoVO vo = JsonUtil.getJsonToBean(entity, ZXGL_XiangMuFenJie_mingxibiaoInfoVO.class);
        vo.setRwly(dynDicUtil.getDicName(vo.getRwly(), "669875872030815877"));
        vo.setRwlx(dynDicUtil.getDicName(vo.getRwlx(), "670160918163781253"));
        vo.setZrr(generaterSwapUtil.userSelectValues(vo.getZrr()));
        vo.setZrbm(generaterSwapUtil.comSelectValues(vo.getZrbm()));
        vo.setXzr(generaterSwapUtil.userSelectValues(vo.getXzr()));
        vo.setXzbm(generaterSwapUtil.comSelectValues(vo.getXzbm()));
        vo.setRwqxkz(generaterSwapUtil.userSelectValues(vo.getRwqxkz()));
        vo.setZqrw(dynDicUtil.getDicName(vo.getZqrw(), "669876395320571525"));
        vo.setFkzq(dynDicUtil.getDicName(vo.getFkzq(), "667375897669539141"));
        vo.setGxckry(generaterSwapUtil.userSelectValues(vo.getGxckry()));
        vo.setZt(dynDicUtil.getDicName(vo.getZt(), "667276146122954053"));
        vo.setYjbj(dynDicUtil.getDicName(vo.getYjbj(), "667375644950140229"));
        vo.setWcjfw(generaterSwapUtil.getFileNameInJson(vo.getWcjfw()));
        vo.setSjlx(dynDicUtil.getDicName(vo.getSjlx(), "667277254828496197"));
        vo.setSjdw(dynDicUtil.getDicName(vo.getSjdw(), "671337925434177157"));

        //子表数据转换

        //附表数据转换
        return ActionResult.success(vo);
    }


    /**
     * 更新
     *
     * @param id
     * @return
     */
    @PutMapping("/{id}")
    @Transactional
    public ActionResult update(@PathVariable("id") String id, @RequestBody @Valid ZXGL_XiangMuFenJie_mingxibiaoUpForm zXGL_XiangMuFenJie_mingxibiaoUpForm) throws DataException {
        UserInfo userInfo = userProvider.get();
        ZXGL_XiangMuFenJie_mingxibiaoEntity entity = zXGL_XiangMuFenJie_mingxibiaoService.getInfo(id);
        if (entity != null) {
            ZXGL_XiangMuFenJie_mingxibiaoEntity subentity = JsonUtil.getJsonToBean(zXGL_XiangMuFenJie_mingxibiaoUpForm, ZXGL_XiangMuFenJie_mingxibiaoEntity.class);
            zXGL_XiangMuFenJie_mingxibiaoService.update(id, subentity);
            return ActionResult.success("更新成功");
        } else {
            return ActionResult.fail("更新失败，数据不存在");
        }
    }


    /**
     * 删除
     *
     * @param id
     * @return
     */
    @DeleteMapping("/{id}")
    @Transactional
    public ActionResult delete(@PathVariable("id") String id) {
        ZXGL_XiangMuFenJie_mingxibiaoEntity entity = zXGL_XiangMuFenJie_mingxibiaoService.getInfo(id);
        if (entity != null) {
            zXGL_XiangMuFenJie_mingxibiaoService.delete(entity);

        }
        return ActionResult.success("删除成功");
    }


    /***
     * 任务反馈单
     * @param id
     * @return
     */
    @GetMapping("/getMingxibiao/{id}")
    @Transactional
    public ActionResult getMingxibiao(@PathVariable("id") String id) {
        return ActionResult.success(zXGL_XiangMuFenJie_mingxibiaoService.getMingxibiao(id));
    }

    /**
     * 根据项目获取任务记录
     *
     * @param xmId
     * @return
     * @throws IOException
     */
    @GetMapping("/getListByXmId/{xmId}")
    public ActionResult getListByXmId(@PathVariable String xmId) throws IOException {
        return ActionResult.success(zXGL_XiangMuFenJie_mingxibiaoService.getList(xmId));
    }

    /**
     * 根据项目树单击查询所属项目的任务
     *
     * @param xmid
     * @return
     * @throws IOException
     */
    @GetMapping("/listById/{xmid}")
    @Transactional
    public ActionResult listById(@PathVariable("xmid") String xmid) throws IOException {
        ZXGL_XiangMuFenJie_mingxibiaoPagination zxglXiangMuFenJieMingxibiaoPagination = new ZXGL_XiangMuFenJie_mingxibiaoPagination();
        zxglXiangMuFenJieMingxibiaoPagination.setXmid(xmid);
        List<ZXGL_XiangMuFenJie_mingxibiaoEntity> list = zXGL_XiangMuFenJie_mingxibiaoService.getList(zxglXiangMuFenJieMingxibiaoPagination);
        //处理id字段转名称，若无需转或者为空可删除
        for (ZXGL_XiangMuFenJie_mingxibiaoEntity entity : list) {
            entity.setRwly(dynDicUtil.getDicName(entity.getRwly(), "669875872030815877"));
            entity.setRwlx(dynDicUtil.getDicName(entity.getRwlx(), "670160918163781253"));
            entity.setZrr(generaterSwapUtil.userSelectValues(entity.getZrr()));
            entity.setZrbm(generaterSwapUtil.comSelectValues(entity.getZrbm()));
            entity.setXzr(generaterSwapUtil.userSelectValues(entity.getXzr()));
            entity.setXzbm(generaterSwapUtil.comSelectValues(entity.getXzbm()));
            entity.setRwqxkz(generaterSwapUtil.userSelectValues(entity.getRwqxkz()));
            entity.setZqrw(dynDicUtil.getDicName(entity.getZqrw(), "669876395320571525"));
            entity.setFkzq(dynDicUtil.getDicName(entity.getFkzq(), "667375897669539141"));
            entity.setGxckry(generaterSwapUtil.userSelectValues(entity.getGxckry()));
            entity.setZt(dynDicUtil.getDicName(entity.getZt(), "667276146122954053"));
            entity.setYjbj(dynDicUtil.getDicName(entity.getYjbj(), "667375644950140229"));
            entity.setWcjfw(generaterSwapUtil.getFileNameInJson(entity.getWcjfw()));
            entity.setSjlx(dynDicUtil.getDicName(entity.getSjlx(), "667277254828496197"));
            entity.setSjdw(dynDicUtil.getDicName(entity.getSjdw(), "671337925434177157"));
        }
        List<ZXGL_XiangMuFenJie_mingxibiaoListVO> listVO = JsonUtil.getJsonToList(list, ZXGL_XiangMuFenJie_mingxibiaoListVO.class);
        for (ZXGL_XiangMuFenJie_mingxibiaoListVO zXGL_XiangMuFenJie_mingxibiaoVO : listVO) {
        }

        PageListVO vo = new PageListVO();
        vo.setList(listVO);
        PaginationVO page = JsonUtil.getJsonToBean(zxglXiangMuFenJieMingxibiaoPagination, PaginationVO.class);
        vo.setPagination(page);
        return ActionResult.success(vo);
    }

    /**
     * 任务转办单
     *
     * @param id
     * @return
     */
    @GetMapping("/getRenwuZhuanBanMX/{id}")
    @Transactional
    public ActionResult getRenwuZhuanBanMX(@PathVariable String id) {
        UserInfo user = userProvider.get();
        ZXGL_XiangMuFenJie_mingxibiaoEntity entity = zXGL_XiangMuFenJie_mingxibiaoService.getById(id);
        ZXGL_RenWuZhuanBanEntity zhuanban = new ZXGL_RenWuZhuanBanEntity();
        zhuanban.setSqr(user.getUserId());
        zhuanban.setZbrq(new DateTime());
        zhuanban.setSqbm(user.getDepartmentId());
        zhuanban.setZbrw(entity.getRwmc());
        zhuanban.setRwbh(entity.getRwbh());
        zhuanban.setRwid(entity.getId());
        zhuanban.setZbr(entity.getZrr());
        zhuanban.setZbrbm(entity.getZrbm());
        //转办部门负责人
//        OrganizeEntity zbfzr = organizeApi.getById(entity.getZrbm());
//        zhuanban.setZbbmfzr(zbfzr.getDirector());
        zhuanban.setZbbmfzr(entity.getZrr());
        zhuanban.setXbr(entity.getXzr());
        zhuanban.setXbrbm(entity.getXzbm());
        //协办部门负责人
//        OrganizeEntity xbfzr = organizeApi.getById(entity.getXzbm());
//        zhuanban.setXbrbmfzr(xbfzr.getDirector());
        zhuanban.setXbrbmfzr(entity.getXzr());

        ZXGL_XiangMuLiXiang_MingXiEntity model = zxgl_xiangMuLiXiang_mingXiService.getInfo(entity.getXmid());
        if (model != null) {
            zhuanban.setXmzrr(model.getZzr());
            if (zhuanban.getZbr().equals(zhuanban.getXmzrr())) {
                // 项目责任人和任务责任人一致
                zhuanban.setRysfxt("1");
            } else {
                // 项目责任人和任务责任人不一致
                zhuanban.setRysfxt("0");
            }
        }
        return ActionResult.success(zhuanban);
    }

    /***
     * 任务变更
     */
    @GetMapping("/getRenWuBianGengMX/{id}")
    @Transactional
    public ActionResult getRenWuBianGengMX(@PathVariable String id) {
        return ActionResult.success(zXGL_XiangMuFenJie_mingxibiaoService.getRenWuBianGengMX(id));
    }

    @GetMapping("/getUserDeptByUserId/{userid}")
    @Transactional
    public ActionResult getUserDeptByUserId(@PathVariable String userid) {
        try {
            return usersApi.getInfo(userid);
        } catch (DataException e) {
            throw new RuntimeException(e);
        }
    }

    /**
     * 根据项目Id查询当前项目下每个任务的最新的任务反馈信息
     *
     * @param xmId
     * @return
     */
    @GetMapping("/getLastRwfkFromRwByXmId/{xmId}")
    public ActionResult getLastRwfkFromRwByXmId(@PathVariable String xmId) {
        try {
            List<ZXGL_XiangMuFenJie_mingxibiao_AI_ListVO> list = new ArrayList<>();
            QueryWrapper<ZXGL_XiangMuFenJie_mingxibiaoEntity> queryWrapper = new QueryWrapper<>();
            queryWrapper.eq("xmid", xmId);
            List<ZXGL_XiangMuFenJie_mingxibiaoEntity> queryList = zXGL_XiangMuFenJie_mingxibiaoService.list(queryWrapper);

            for (ZXGL_XiangMuFenJie_mingxibiaoEntity entity : queryList) {
                ZXGL_XiangMuFenJie_mingxibiao_AI_ListVO model = new ZXGL_XiangMuFenJie_mingxibiao_AI_ListVO();
                model.setTaskName(entity.getRwmc());
                model.setTaskDetails(entity.getWcqksm());
                if (StrUtil.isNotEmpty(entity.getRwjd())) {
                    BigDecimal bigDecimal = Convert.toBigDecimal(entity.getRwjd());
                    BigDecimal result = bigDecimal.divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP); // 除以100，保留两位小数，使用四舍五入
                    model.setTaskProgress(result);
                }
                // model.setTaskResponsibleId(entity.getZrr());
                ActionResult<UserInfoVO> result = usersApi.getInfo(entity.getZrr());
                if (result.getCode().equals(200)) {
                    if (result.getData() != null) {
                        model.setTaskResponsibleName(result.getData().getRealName());
                    }
                }
                // model.setResponsibleDepartment(entity.getZrbm());
                list.add(model);
            }
            return ActionResult.success("读取成功", list);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return ActionResult.fail("查询失败");
    }


    /**
     * 根据项目Id查询任务
     *
     * @param xmid
     * @return
     * @throws IOException
     */
    @GetMapping("/listByXmId/{xmid}")
    @Transactional
    public ActionResult listByXmId(@PathVariable("xmid") String xmid) throws IOException {
        QueryWrapper<ZXGL_XiangMuFenJie_mingxibiaoEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(ZXGL_XiangMuFenJie_mingxibiaoEntity::getXmid, xmid);
        List<ZXGL_XiangMuFenJie_mingxibiaoEntity> list = zXGL_XiangMuFenJie_mingxibiaoService.list(queryWrapper);
        if (list != null && list.size() > 0) {
            List<ZXGL_XiangMuFenJie_mingxibiaoListVO> listVO = JsonUtil.getJsonToList(list, ZXGL_XiangMuFenJie_mingxibiaoListVO.class);
            return ActionResult.success(list);
        }
        return ActionResult.success();
    }


}
